#ifndef _SEED_PARSER_SUBSCRIBER_H_
#define _SEED_PARSER_SUBSCRIBER_H_

/*
 * SubscriberConfig
 */
class Subscriber
{
    public:
    
    Subscriber(const string & xpath, const bool sync)
        : _xpath(xpath), _sync(sync)
    {
    }

    virtual ~Subscriber() = 0;

    private:
    
    const string _xpath;
    const bool _sync;
};

/*
 *
 */
class DOMSubscriber
{
    public:
    
    DOMSubscriber(const string & xpath, 
                  shared_ptr<DOMSubscriber> & sub,
                  const bool sync = false)
    : 
    Subscriber(xpath, sync), 
    _callback(sub)
    {
    }

    virtual ~DOMSubscriberConfig()
    {
    }

    private:

    shared_ptr<DOMSubscriber> _callback;
};

/*
 *
 */
class SAXSubscriber
{
    public:
    
    SAXSubscriber(const string & xpath, 
                  shared_ptr<DOMSubscriber> & sub,
                  const bool sync = false)
    : 
    Subscriber(xpath, sync), 
    _callback(sub)
    {
    }

    virtual ~SAXSubscriber()
    {
    }

    private:

    shared_ptr<SAXSubscriber> _callback;
};

#endif
